<%@ page contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html>
<html>
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>主页</title>
</head>
<body> 


<div >
您好！<%=session.getAttribute("account")%> !   您目前的待办条数:<span id="taskNumSpan" style="color:red">0</span>
</div>

<br>
<br><a href="<%=request.getContextPath()%>/lgc/logout">登出</a>


<!--- 不断刷新，放在Session超时退出  -->

<script src="<%=request.getContextPath()%>/js/jquery.min63b9.js"></script>
<script>
   
       	window.onload=function(){
       		refreshTaskNumber();
       	}		
			
		
      function refreshTaskNumber(){
         
  	 	var data = "{}";
		$.ajax({
			type: "get",
			url: "<%=request.getContextPath()%>/lgc/tasknumber",
			data: data,
			cache: false,
			success: function(html){
			    //alert(html);
				$("#taskNumSpan").html(html);
			}
		});
     }
     
     setInterval(refreshTaskNumber,30000);
</script>

</body>
</html>